/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.personal.mapper;

import com.koron.personal.domain.MyCertificate;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface MyCertificateMapper {
    Integer insert(@Param("bean") MyCertificate bean);

    Integer batchInsert(@Param("myCertificateList") List<MyCertificate> myCertificateList);

    Integer delete(@Param("id") String id);

    Integer batchDelete(@Param("idList") List<String> idList);

    Integer update(@Param("bean") MyCertificate bean);

    Integer batchUpdate(@Param("myCertificateList") List<MyCertificate> myCertificateList);

    MyCertificate queryOne(@Param("id") String id);

    List<MyCertificate> queryByCondition(@Param("staffCode") String staffCode,@Param("start") Integer start,@Param("rows") Integer rows, @Param("keyword") String keyword);

    Integer countByCondition(@Param("staffCode") String staffCode, @Param("keyword") String keyword);

    List<Map<String,Object>> queryRequiredCertificate(@Param("jobsStaffId") String jobsStaffId);

    List<Map<String,Object>> queryDuties(@Param("staffCode") String staffCode);

    MyCertificate queryByStaffCodeAndJobsStaffCertificateId(@Param("staffCode") String staffCode,@Param("jobsStaffCertificateId") String jobsStaffCertificateId,@Param("id") String id);

    List<MyCertificate> queryCetificateByIdList(@Param("idList")List<String> idList, @Param("codeList") List<String> codeList,@Param("staffName") String staffName, @Param("dutyName") String dutyName,
                                                @Param("certificateName") String certificateName,@Param("deptCode")  String deptCode,
                                                @Param("status") Integer status,@Param("time") Date time);

    List<MyCertificate> queryByStaffCodeAndCertificateType(@Param("staffCode") String staffCode,@Param("certificateTypeId") String certificateTypeId,@Param("id") String id);
}
